#ifndef PERSONAL_INFO_LOGIC_H
#define PERSONAL_INFO_LOGIC_H

#include "PptpClient.h"
#include "personal_info_ui.h"

class PersonalInfoLogic : public QObject
{
    Q_OBJECT

public:
    explicit PersonalInfoLogic(PersonalInfoUI *ui, QObject *parent = nullptr);
    ~PersonalInfoLogic();

private:
    PersonalInfoUI *ui;
    PptpClient pptpclient;
    PptpMessage requestMessage;
    PptpMessage responseMessage;
    void getUserInfo();
    void onSaveClicked();
    void getAvatar();

private slots:
    void onSaveResponse(PptpMessage responseMessage);
    void setAvatarResponse(PptpMessage responseMessage);
    void onAccountSecurityClicked();
    void onUserInfoResponse(PptpMessage responseMessage);
    void onAvatarLabelClicked();
    void onGetAvatarResponse(PptpMessage responseMessage);
};

#endif // PERSONAL_INFO_LOGIC_H
